-
Notifications
You must be signed in to change notification settings - Fork 22
Remove glpi tools dep #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
GLPI tools is not included in GLPI, that's still something to be done. |
|
My mistake this one should be in draft until glpi-project/glpi#22465 is merged. I put it in the interconnect merge order but forgot to flat this as draft for now. Edit could still be checked but only merged by following the order (and after glpi release) Looks like I can't change the status from GitHub Mobile app |
tests/bootstrap.php
Outdated
| $current_plugin_folder = basename(realpath(__DIR__ . '/../')); | ||
|
|
||
| require __DIR__ . '/../../../tests/bootstrap.php'; | ||
| require dirname(__DIR__) . '/vendor/autoload.php'; | ||
|
|
||
| if (!Plugin::isPluginActive("{LNAME}")) { | ||
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); | ||
| if (!Plugin::isPluginActive($current_plugin_folder)) { | ||
| echo("Plugin $current_plugin_folder is not active in the test database" . PHP_EOL); | ||
| die(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing an exception seems better than die()?
| $current_plugin_folder = basename(realpath(__DIR__ . '/../')); | |
| require __DIR__ . '/../../../tests/bootstrap.php'; | |
| require dirname(__DIR__) . '/vendor/autoload.php'; | |
| if (!Plugin::isPluginActive("{LNAME}")) { | |
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); | |
| if (!Plugin::isPluginActive($current_plugin_folder)) { | |
| echo("Plugin $current_plugin_folder is not active in the test database" . PHP_EOL); | |
| die(); | |
| require __DIR__ . '/../../../tests/bootstrap.php'; | |
| require dirname(__DIR__) . '/vendor/autoload.php'; | |
| if (!Plugin::isPluginActive("{LNAME}")) { | |
| throw new RuntimeException("Plugin {LNAME} is not active in the test database"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Far better, yes. Also die() returns 0; which is not an error.
GLPI tools is now natively inside GLPI 11 core, we can remove it's dependency.
Based on what was done on the whatsapp plugin, I've updated the autoload and test bootstrap.
Interconnected PR (merge order) :